import { request } from '@/utils/request/request';
import { RequestEnum } from '@/enums/httpEnum';

export const collectionApi = {
  collectionAddOrDel: '/userCollectionLink/addOrDel',
  collectionList: '/userCollectionLink/list',
} as const;

export const collectionUpdate = (data: API.commentInteractionUpdate) => {
  return request({
    url: collectionApi.collectionAddOrDel,
    method: RequestEnum.POST,
    data,
  });
};

export const getCollectionList = (params: API.collectionAndLikeRequest) => {
  return request({
    url: collectionApi.collectionList,
    method: RequestEnum.GET,
    params,
  });
};
